case $CONFIG in
'')	 if test -r ../config.sh
	 then 
	    . ../config.sh ;
	 else 
	    spitshell=cat
	    package=IRC
	 fi
	 ;;
esac

echo "Extracting $package/ircd/version.c..."

if test -r version.c
then
   generation=`sed -n 's/^char \*generation = \"\(.*\)\";/\1/p' < version.c`
   if test ! "$generation" ; then generation=0; fi
else
   generation=0
fi

generation=`expr $generation + 1`

creation=`date | \
awk '{if (NF == 6) \
         { print $1 " "  $2 " " $3 " "  $6 " at " $4 " " $5 } \
else \
         { print $1 " "  $2 " " $3 " " $7 " at " $4 " " $5 " " $6 }}'`

$spitshell >version.c <<!SUB!THIS!
/*
 *   IRC - Internet Relay Chat, ircd/version.c
 *   Copyright (C) 1990 Chelsea Ashley Dyerman
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 1, or (at your option)
 *   any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

/*
 * This file is generated by version.c.SH. Any changes made will go away.
 */

#include "struct.h"
#include "patchlevel.h"

char *generation = "$generation";
char *creation = "$creation";
char *version = IRCD_VERSION PATCH1 PATCH2 PATCH3 PATCH4\
		PATCH5 PATCH6 PATCH7 PATCH8 PATCH9;

char *infotext[] =
    {
	"$package -- AstralIRCd " IRCD_VERSION,
	"Based on the original code written by Jarkko Oikarinen",
	"Copyright 1988, 1989, 1990, 1991 University of Oulu, Computing Center",
	"-",
	"This program is free software; you can redistribute it and/or",
	"modify it under the terms of the GNU General Public License as",
	"published by the Free Software Foundation; either version 1, or",
	"(at your option) any later version.",
	"-",
        "Current coders and designers:",
        "AstralNet Coding Team     -    coding@xivservers.net",
		"..",
		"Executive Team Leader: Sephiroth"
        //"See http://www.xivservers.net/irc/ for more info.",
	"-",
	IRCD_VERSION PATCH1 PATCH2 PATCH3 PATCH4 PATCH5 PATCH6 PATCH7
		PATCH8 PATCH9,
	0,
    };
!SUB!THIS!
